//
//  ACCollectionViewcell.m
//  HomeIn
//
//  Created by 张涛 on 15/11/8.
//  Copyright © 2015年 ZZP. All rights reserved.
//

#import "ACCollectionViewcell.h"
#import "ACModel.h"
#import "ACLLModel.h"
@implementation ACCollectionViewcell

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self)
    {
        [self creat];
    }
    return self;
}
-(void)creat
{
    self.imgImageView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 70 * WIDTHSCALE, 70 *HEIGHTSCALE)];
    self.imgImageView.backgroundColor = [UIColor redColor];
    [self.contentView addSubview:self.imgImageView];
    //
    self.titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(20 * WIDTHSCALE, 70 *HEIGHTSCALE, 70 *WIDTHSCALE, 20 * HEIGHTSCALE)];
    self.titleLabel.backgroundColor = [UIColor clearColor];
    self.titleLabel.font = [UIFont fontWithName:@"Arial" size:13];
    [self.contentView addSubview:self.titleLabel];
    
}
-(void)setModel:(ACLLModel *)model
{
    _model = model;
    [self.imgImageView sd_setImageWithURL:[NSURL URLWithString:_model.icon_url] placeholderImage:nil];
    self.titleLabel.text = _model.name;
    
}
@end
